package com.xqc.web.client;

import com.xqc.web.annotion.XqcRpcClient;
import com.xqc.api.facade.UserFacade;
import com.xqc.api.response.UserResponse;
import com.xqc.common.utils.XqcWebResult;
import org.apache.dubbo.config.annotation.DubboReference;

import java.util.List;

@XqcRpcClient
public class UserFacadeClient {

    @DubboReference(version = "${dubbo.application.version}",check = false)
    private UserFacade userFacade;

    public XqcWebResult<List<UserResponse>> queryAll(){
        return XqcWebResult.success(this.userFacade.queryAll());
    }

    public XqcWebResult<Boolean> insert(){
        return XqcWebResult.success(this.userFacade.insert());
    }


}
